From 811c1c9484aedc5b520d26163441d09b70078e57 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 28 Oct 2015 16:35:16 -0400 Subject: [PATCH] spinbutton: Trivial cleanup Use g_clear_object in a few places. --- gtk/gtkspinbutton.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c index bac8bdeb23..a148c0679d 100644 --- a/gtk/gtkspinbutton.c +++ b/gtk/gtkspinbutton.c @@ -736,11 +736,8 @@ gtk_spin_button_finalize (GObject *object) gtk_spin_button_unset_adjustment (spin_button); - if (priv->down_panel_context) - g_object_unref (priv->down_panel_context); - - if (priv->up_panel_context) - g_object_unref (priv->up_panel_context); + g_clear_object (&priv->up_panel_context); + g_clear_object (&priv->down_panel_context); g_object_unref (priv->swipe_gesture); -- 2.30.2